package API.StringJoinerDemo;

import java.util.StringJoiner;

public class basis {
    public static void main(String[] args) {
        StringJoiner sj = new StringJoiner(",", "[", "]");
        int[] arr = {1, 2, 3, 4, 5};
        for (int i : arr) {
            sj.add(i + "");
        }
        System.out.println(sj.length());
        String st = sj.toString();
        System.out.println(st);
    }
}
